<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<%!public static void showMenu(javax.servlet.jsp.JspWriter out,
			java.util.List<com.pur.zsms.pmsnmanage.menu.po.MenuPo> menuList)
			throws Exception {
		if (menuList == null || menuList.size() == 0) {
			return;
		} else {
			for (com.pur.zsms.pmsnmanage.menu.po.MenuPo view : menuList) {
				out.println("<li>");
				out.println("<span>");
				if (view.getSubPurview().size() > 0) {
					out.println(view.getMenuName() + "</span>");
				}else{
 				   out.println("<a href='#' onclick=addTab('"+view.getMenuLink()+"','"+view.getMenuId()+"','"+view.getMenuName()+"')>"
				    + view.getMenuName() + "</a>");
 					/* out.println("<a target='content' href='" + view.getMenuLink()
							+ "'>" + view.getMenuName() + "</a>"); */
				}
				out.println("</span>");
				if (view.getSubPurview().size() > 0) {
					out.println("<ul>");
					showMenu(out, view.getSubPurview());
					out.println("</ul>");
				}
				out.println("</li>");
			}
		}

	}%>

<html>
<head>
<title>周子意编程系统</title>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/icon.css"/>" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/tree.css"/>" />
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.tree.js"/>"></script>
<script type="text/javascript"
            src="<c:url value="/static/js/common.js"/>"></script>
</head>

 
<body background="">

<ul id="tt1" class="easyui-tree" animate="true">

	<%
		showMenu(
		out,
		(java.util.List<com.pur.zsms.pmsnmanage.menu.po.MenuPo>) request
				.getAttribute("menu"));
	%>

</ul>
</BODY>
</html>